@layout('layouts.setup')

@section('setup')
<center>
<div id="login-wraper-border">
            <div id="login-wraper">
  <!--{{ Form::open('console/auth/forgot', 'POST', array('class'=>'form-actions','id'=>'forgotForm','style'=>'border:1px solid #E5E5E5;margin:50px auto;padding:19px 29px 29px;max-width:400px;box-shadow:0 1px 2px rgba(0, 0, 0, 0.05)')) }}-->
  {{ Form::open('console/auth/forgot', 'POST', array('class'=>'form-actions','id'=>'forgotForm','style'=>'')) }}

  <!--<h3>{{ Str::upper(__('global.forgotpassword')) }}</h3>-->
  <legend>{{ Str::upper(__('global.forgotpassword')) }}</legend>
  {{ Label::important(Str::title('Masukkan E-mel Yang Didaftarkan Didalam Sistem')); }}
  <br/>
  <br/>
  <div class="body">
  {{ Form::xlarge_text('emel',null,array('placeholder'=>__('global.type').' '.__('global.registeredemel'),'required')) }}
  {{ Form::submit(Str::title(Lang::line('global.reset')->get().' '.Lang::line('global.password')->get()), array('class' => 'btn btn-info','id'=>'forgotBtn'))}}
  </div>
  {{ Form::close()}}
  </div>
</div>
</center>
@endsection

@section('scripts')

<script type="text/javascript">

$(document).ready(function () {
    var intputElements = document.getElementsByTagName("INPUT");
    for (var i = 0; i < intputElements.length; i++) {
        intputElements[i].oninvalid = function (e) {
            e.target.setCustomValidity("");
            if (!e.target.validity.valid) {
                if (e.target.name == "emel") {
                    e.target.setCustomValidity("Ruangan ini perlu diisi");
                }
            }
        };
    }
})

</script>

@endsection

